package com.payment.web.service.impl;

import cn.afterturn.easypoi.word.WordExportUtil;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.io.IORuntimeException;
import com.payment.web.model.domain.PdfDomain;
import com.payment.web.service.ConvertPdfService;
import com.payment.web.util.WordUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.io.FileOutputStream;
import java.util.Map;

/**
 * @author douhaichao
 * @version 1.0
 * @date 2020年4月1日
 */
@Slf4j
@RestController
public class ConvertPdfServiceImpl implements ConvertPdfService {

    @Autowired
    WordUtil wordUtil;

    @Override
    public String toPdf(PdfDomain req) {
        return wordUtil.toPdf(req);
    }
}
